package comday07.itheima03;

public class Demo02 {
    public static void main(String[] args) {

        //创建学生对象
        Student s1 = new Student();

        s1.setName("马冬梅");
        s1.setSex("女");
        s1.setAge(18);

        //打印
        System.out.println(s1.getName() + " " + s1.getAge());


        //创建学生对象
        Student s2 = new Student("马冬梅","女",20);

        s2.eat("刀削面");
        s2.eat("包子");

        //打印
        System.out.println(s2.getName() + " " + s2.getAge());


        //set方法赋值    和构造方法赋值  功能上感觉一样
        //两种写法都要留下
        //我们自己写代码时可以哪个简单用哪个
    }
}
